﻿
namespace visinia.SmartEngine.Modules
{
    /// <summary>
    /// visinia modules are asp.net UserCcontrol, and ModuleInfo is the 
    /// part of the visinia module which is used
    /// to hold the visinia specific information of that UserControl 
    /// </summary>
    public class ModuleInfo
    {
        public ModuleInfo()
        { }

        public ModuleInfo(int moduleInstalledId, int pageId, string pane)
        {
            ModuleInstalledId = moduleInstalledId;
            PageId = pageId;
            Pane = pane;
            Title = "New Module";
            TitleImageUrl = null;
            TitleImageNavigationUrl = null;
            CssClass = "";
            Width = 0;
            Height = 0;
            PaneOrder = 0;
            Visible = true;
        }

        private int _ModuleId;
        /// <summary>
        /// The unique id of the module
        /// </summary>
        public int ModuleId
        {
            get{ return _ModuleId; }
            set{ _ModuleId = value; }
        }

        private int _ModuleInstalledId;
        /// <summary>
        /// The id of the installed module
        /// </summary>
        public int ModuleInstalledId
        {
            get{ return _ModuleInstalledId; }
            set{ _ModuleInstalledId = value; }
        }

        private string _ModuleUrl;
        /// <summary>
        /// The url to the module ascx file
        /// </summary>
        public string ModuleUrl
        {
            get{ return _ModuleUrl; }
            set{ _ModuleUrl = value; }
        }

        private string _ModuleSettingsUrl;
        /// <summary>
        /// The url to the module's settings ascx file
        /// </summary>
        public string ModuleSettingsUrl
        {
            get{ return _ModuleSettingsUrl; }
            set{ _ModuleSettingsUrl = value; }
        }

        private string _Title;
        /// <summary>
        /// Title used for this module, which will be shown on the webpage
        /// at the top of this module
        /// </summary>
        public string Title
        {
            get{ return _Title; }
            set{ _Title = value; }
        }

        private string _TitleImageUrl;
        /// <summary>
        /// The path to the image will be shown with the module title
        /// </summary>
        public string TitleImageUrl
        {
            get { return _TitleImageUrl; }
            set { _TitleImageUrl = value; }
        }

        private string _TitleImageNavigationUrl;
        /// <summary>
        /// The url the title image points to
        /// </summary>
        public string TitleImageNavigationUrl
        {
            get { return _TitleImageNavigationUrl; }
            set { _TitleImageNavigationUrl = value; }
        }

        private string _CssClass;
        /// <summary>
        /// The css class used for the module styling
        /// </summary>
        public string CssClass
        {
            get{ return _CssClass; }
            set{ _CssClass = value; }
        }

        private int _Width;
        /// <summary>
        /// Module width on the webpage
        /// </summary>
        public int Width
        {
            get{ return _Width; }
            set{ _Width = value;}
        }

        private int _Height;
        /// <summary>
        /// Module height on the webpage
        /// </summary>
        public int Height
        {
            get{ return _Height; }
            set{ _Height = value; }
        }

        private int _PageId;
        /// <summary>
        /// The unique id of the page this module resides on
        /// </summary>
        public int PageId
        {
            get{ return _PageId; }
            set{ _PageId = value; }
        }

        private string _Pane;
        /// <summary>
        /// Pane name on the page this module is added to
        /// </summary>
        public string Pane
        {
            get{ return _Pane; }
            set{ _Pane = value; }
        }

        private int _PaneOrder;
        /// <summary>
        /// The module order inside the pane
        /// </summary>
        public int PaneOrder
        {
            get{ return _PaneOrder; }
            set{ _PaneOrder = value; }
        }

        private bool _Visible;
        /// <summary>
        /// The module Visibility
        /// </summary>
        public bool Visible
        {
            get { return _Visible; }
            set { _Visible = value; }
        }
    }
}
